<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ccut" uri="http://ccut.cn/common/"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="description" content="">
	<meta name="author" content="">

	<title>添加用户</title>

	<!-- Bootstrap Core CSS -->
	<link href="${pageContext.request.contextPath}/mb/css/bootstrap.min.css" rel="stylesheet">

	<!-- MetisMenu CSS -->
	<link href="${pageContext.request.contextPath}/mb/css/metisMenu.min.css" rel="stylesheet">

	<!-- DataTables CSS -->
	<link href="${pageContext.request.contextPath}/mb/css/dataTables.bootstrap.css" rel="stylesheet">

	<!-- Custom CSS -->
	<link href="${pageContext.request.contextPath}/mb/css/sb-admin-2.css" rel="stylesheet">

	<!-- Custom Fonts -->
	<link href="${pageContext.request.contextPath}/mb/css/font-awesome.min.css" rel="stylesheet"
		  type="text/css">
	<link href="${pageContext.request.contextPath}/mb/css/boot-crm.css" rel="stylesheet"
		  type="text/css">

	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->

</head>

<body>
<div class="modal-content">
	<form class="form-horizontal" id="add_user_form">
		<p></p>
		<div class="form-group">
			<label for="add_username" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>用户名：</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="add_username" placeholder="初始密码" name="username">
			</div>
		</div>
		<div class="form-group">
			<label for="add_passowrd" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>初始密码：</label>
			<div class="col-sm-10">
				<input type="password" class="form-control" id="add_passowrd" placeholder="初始密码" name="password">
			</div>
		</div>
		<div class="form-group">
			<label for="add_password2" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>确认密码：</label>
			<div class="col-sm-10">
				<input type="password" class="form-control" id="add_password2" placeholder="确认密码" name="password2">
			</div>
		</div>
		<div class="form-group">
			<label for="add_name" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>姓名：</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="add_name" placeholder="初始密码" name="name">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>性别：</label>
			<div class="col-sm-10">
				<div class="radio-box">
					<label for="add_sex1">男</label>
					<input name="sex" type="radio" id="add_sex1" checed value="男">
					<label for="add_sex2">女</label>
					<input type="radio" id="add_sex2" name="sex" value="女">
				</div>
			</div>
		</div>
		<div class="form-group">
			<label for="add_phone" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>联系方式：</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="add_phone" placeholder="联系方式" name="phone">
			</div>
		</div>
		<div class="form-group">
			<label for="add_address" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>地址：</label>
			<div class="col-sm-10">
				<input type="text" class="form-control" id="add_address" placeholder="地址" name="address">
			</div>
		</div>

		<div class="form-group">
			<label for="add_type" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>角色：</label>
			<div class="col-sm-10">
				<select	class="form-control" id="add_type" placeholder="保险费用" name="cust_source">
					<option value="">--请选择--</option>
					<option value="admin">超级管理员</option>
					<option value="customer">用户</option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label for="add_remark" class="col-sm-2 control-label"><span class="c-red" style="color: red">*</span>备注：</label>
			<div class="col-sm-10">
				<textarea id="add_remark" name="remark" cols="110" rows="5" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="$.Huitextarealength(this,100)"></textarea>
				<p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
			</div>
		</div>
	</form>
	<div class="modal-footer">
		<button type="button" class="btn btn-primary" onclick="addUser()">确认</button>
		<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	</div>
</div>

<!-- jQuery -->
<script src="${pageContext.request.contextPath}/mb/js/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="${pageContext.request.contextPath}/mb/js/bootstrap.min.js"></script>

<!-- Metis Menu Plugin JavaScript -->
<script src="${pageContext.request.contextPath}/mb/js/metisMenu.min.js"></script>

<!-- DataTables JavaScript -->
<script src="${pageContext.request.contextPath}/mb/js/jquery.dataTables.min.js"></script>
<script src="${pageContext.request.contextPath}/mb/js/dataTables.bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="${pageContext.request.contextPath}/mb/js/sb-admin-2.js"></script>

<script type="text/javascript">
	function addUser() {
		$.post("${pageContext.request.contextPath}/system/addUser",$("#add_user_form").serialize(),function(data){
			if(data == "0"){
				alert("保险信息添加成功！");
			}else{
				alert("保险信息添加失败！");
			}
			window.location.reload();
		});
	}

</script>
</body>
</html>